# Contributor: Michał Szmidt <michal.sz@disroot.org>
# Maintainer: Michał Szmidt <michal.sz@disroot.org>
pkgname=hctl
pkgver=0.2.5
pkgrel=0
pkgdesc="Ultimate tool to manage (transform, merge, validate) hostlists written in rust for pihole/adguard/unbound dns blocker"
url="https://github.com/michalszmidt/hctl"
arch="all"
license="BSD-3-Clause"
makedepends="openssl-dev cargo cargo-auditable"
source="$pkgname-$pkgver.tar.gz::https://github.com/michalszmidt/hctl/archive/refs/tags/$pkgver.tar.gz"

prepare() {
	default_prepare

	cargo fetch --target="$CTARGET" --locked
}

build() {
	cargo auditable build -p hctl --frozen --release
}

check() {
	cargo test --release --frozen
}

package() {
	install -Dm755 target/release/hctl -t "$pkgdir"/usr/bin/
}

sha512sums="
0c317921c60041c594942a520317061f056b04d9d72c9143e3f143dd1af7ce1a33236aedc6bd7b5fcf762431d26713590c29e62fa407895cf36d3baedccca633  hctl-0.2.5.tar.gz
"
